package com.创建方式二实现Runnable.匿名内部类写法;
/*
匿名内部类写法
 */
public class RunnableDemo {
    public static void main(String[] args) {
        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 200; i++) {
                    System.out.println("内部类 子线程:"+i);
                }
            }
        };
        //启动线程
        new Thread(runnable).start();


        for (int i = 0; i < 150; i++) {
            System.out.println("主线程:+i");
        }
    }
}
